package com.yang.design.structure.proxy.jdk;

import com.yang.design.structure.proxy.statics.IUserDao;
import com.yang.design.structure.proxy.statics.UserDaoImpl;

public class Client {
    public static void main(String[] args) {
        IUserDao target = new UserDaoImpl();
        System.out.println(target.getClass());

        IUserDao proxyInstance =(IUserDao) new ProxyFactory(target).getProxyInstance();
        System.out.println(proxyInstance.getClass());
        boolean result = proxyInstance.save("张三");
        System.out.println(result);

        while (true){}
    }
}
